{literal}
<script type="text/javascript">
$(document).ready(function(){
	displayAutoComplete('row_id_list');
});
</script>
{/literal}

<div>
	<span id='statusMessage'></span>
</div>
<!-- Form for new template -->
<div id='templateFormDiv'>	
	<form id='templateForm'>
	<input id="templateId" type='hidden' name='template[template_id]' value='{$templateId}'></input>
	<table id='templateTable' cellspacing=0 cellpadding=0 class='grid' style='width: 100%'>		
		<thead>
			<tr>
				<th style='width: 200px'>{translate}Medicine name{/translate}</th>
				<th style='width: 230px'>{translate}Usage{/translate}</th>
				<th style='width: 200px'>{translate}Dosage{/translate}</th>
				<th style='width: 100px'>{translate}Time{/translate}</th>
				<th style='width: 100px'>{translate}Quantity{/translate}</th>
				<th class='last'>{translate}Description{/translate}</th>
			</tr>
		</thead>
		<tbody>
			{$templateBody}
		</tbody>
	</table>		
	</form>
	<br />
	<button id='newTemplateButton' onclick="saveTemplate();">{translate}Save{/translate}</button>
	<button id='removeTemplate' onclick="removeTemplate()">{translate}Delete{/translate}</button>
	<span id='successMessage' style="padding-left: 20px; font-style: italic; color: green;"></span>
</div>